#include <iostream>

using namespace std;

void setPoint(int table[17][17], int x, int y, int terX, int terY){
	if(x >= 1 && x <= terX && y >=1 && y <= terY)
		table[x][y] = -1;
}

int main(){
	int terX,terY,horseX,horseY;
	cin >> terX >> terY >> horseX >> horseY;
	terX++;terY++;horseX++;horseY++;
	int table[17][17]={0};
	table[1][1] = 1;
	setPoint(table,horseX,horseY,terX,terY);
	setPoint(table,horseX - 2,horseY - 1,terX,terY);
	setPoint(table,horseX - 1,horseY - 2,terX,terY);
	setPoint(table,horseX - 2,horseY + 1,terX,terY);
	setPoint(table,horseX - 1,horseY + 2,terX,terY);
	setPoint(table,horseX + 2,horseY - 1,terX,terY);
	setPoint(table,horseX + 1,horseY - 2,terX,terY);
	setPoint(table,horseX + 2,horseY + 1,terX,terY);
	setPoint(table,horseX + 1,horseY + 2,terX,terY);
	for(int x = 1; x <= terX; x++){
		for(int y = 1; y <=terY; y++){
			if(x == 1 && y == 1) continue;
			if(table[x][y] == -1) continue;
			if(table[x-1][y] == -1 && table[x][y-1] == -1){
				table[x][y] = 0;
				continue;
			}
			if(table[x-1][y] == -1){
				table[x][y] = table[x][y-1];
				continue;
			}
			if(table[x][y-1] == -1){
				table[x][y] = table[x-1][y];
				continue;
			}
			table[x][y] = table[x-1][y] + table[x][y-1];
		}
	}
	cout << table[terX][terY] << endl;
}
